import http from '@/design/libs/request/request'

const BASE_URL = '/plugins/couponmall/goods'
export default {
  // 获取列表数据
  list: data => http.post(BASE_URL + '/list', data),
  // 创建数据
  create: data => http.post(BASE_URL + '/create', data),
  // 获取数据
  fetch: (id) => http.post(BASE_URL + '/fetch/' + id),
  // 更新数据
  update: data => http.post(BASE_URL + '/update', data),
  // 删除单个
  delete: (id) => http.post(BASE_URL + '/delete/' + id),
  // 删除集合
  del: data => http.post(BASE_URL + '/delete', data),
  // 更新状态
  disable: data => http.post(BASE_URL + '/disable', data),

  datalist:data=> http.post(BASE_URL + '/dataList', data),

  couponBind:data=> http.post(BASE_URL + '/couponBind', data),

  // 审核商品
  auditGoods: data => http.post(BASE_URL + '/audit', data),

  // 模板查询
  template: data => http.post('/market/coupon' + '/template', data),

  getUrlLink: (goodsNo) => http.post(BASE_URL + '/getUrlLink/' + goodsNo),

  getGoodsQrCode: (goodsNo) => http.get(BASE_URL + '/getGoodsQrCode/' + goodsNo),

  getGoodsQrCode2: (goodsNo) => http.get(BASE_URL + '/getGoodsQrCode2/' + goodsNo)
}
